package cn.xinfei.xdecision.pulsar.util;

import cn.xinfei.xdecision.conf.ApplicationContextUtil;

public class PulsarUtils {

    public static String getValueFromEnv(String placeHolder) {
        if (placeHolder.startsWith("$")) {
            placeHolder = placeHolder.substring(2, placeHolder.length() - 1);
        }
        String property = ApplicationContextUtil.getApplicationContext().getEnvironment().getProperty(placeHolder);
        return property;
    }
}
